package wzh.crm.bl;

import org.jsoup.Connection;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;

import java.io.IOException;
import java.sql.SQLException;
import java.util.List;

import wzh.crm.db.CURDDB;
import wzh.crm.vo.Vo;

/**
 * Created by wangzehao on 2016/5/25.
 */
public class CURDBL<T extends Vo> {
    protected CURDDB<T> db;
    CURDBL(CURDDB<T> db){
        this.db=db;
    }
    public List<T> getAll() throws Exception{
        return db.getAll();
    }
    public List<T> getMine(int myId) throws Exception{
        return db.getMine(myId);
    }
    public void delete(T model) throws Exception{
        db.delete(model);
    }
    public void save(T model) throws Exception{
        db.save(model);
    }

    public T get(int id) throws Exception{
        return db.get(id);
    }
}
